package com.example.demoapplication;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-11-11
 * Time: 12:49
 */

@RestController
public class CalculateController {
    @RequestMapping("/calc")
    public String sum(Integer num1 , Integer num2){
        int sum = num1 + num2;
        return "<h1>计算的结果是：" + sum + "</h1>";
    }
}
